<!DOCTYPE html>
<html lang="en" ng-app="main">
    <head>
      <meta charset="UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <title>
            <% if(result && result.length>0 && JSON.parse(result).is_del==0){ %>
                <%=JSON.parse(result).name%>
            <% } else{ %>
                活动不存在或已过期
            <% } %>
      </title>
      <link rel="shortcut icon" href="/images/favicon.ico" />
      <meta http-equiv="Cache-Control" content="no-cache">
      <meta name="viewport" id="mobileViewport" content="">
      <meta content="telephone=no" name="format-detection">
      <link href="/manage/css/global.css" rel="stylesheet">
      <link type="text/css" rel="stylesheet" href="/web/res/anicss/animate.css" />
      <!-- <link type="text/css" rel="stylesheet" href="/web/res/css/mobile_edit.css" /> -->
      <link type="text/css" rel="stylesheet" href="/web/res/css/idangerous.swiper.css" />
      <script type="text/javascript" data-main src="/web/res/js/core/require.js"></script>
      <script type="text/javascript" src="/web/res/js/vendor/jquery-1.11.2.min.js"></script>
      <script type="text/javascript" src="/manage/js/commlib.js"></script>
      <meta name="apple-mobile-web-app-status-bar-style" content="black" />
      <meta content="telephone=no" name="format-detection" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
      <style>
            body {top:0px;margin: 0px;}
            ul, menu, dir {display: block;list-style-type: disc;-webkit-margin-before: 1em;-webkit-margin-after: 1em;-webkit-margin-start: 0px;-webkit-margin-end: 0px;-webkit-padding-start: 0px;}
            .mobile-container {height: 576px;margin-top: 0px;}
            .mobile-container>li {position: relative;list-style-type:none;}
            li {list-style-type:none; height: 80px;}
      </style>
    </head>
    <% if(result && result.length>0){ %>

    <body style="min-width: auto; overflow-x: hidden;">
        <%var resultData = JSON.parse(result)%>
        <%var resultContent = resultData.content%>
        <%var resultContent = JSON.parse(resultContent)%>
            <% setting = resultContent.setting%>
            <% if(setting && setting.audio){ %>
                <div id="Js-audio" class="audio_btn video_exist play_yinfu hidden">
                    <div id="yinfu" class="rotate"></div>
                </div>
            <% } %>
            <div id="loading" class="loading">
                <i class="icon"></i>
            </div>
            <div class="swiper-container">
                  <ul id="Js-container" class="mobile-container swiper-wrapper" style="display: none;">
                        <%var contents = JSON.parse(result).content%>
                        <% if (typeof(contents) != 'undefined'){ %>
                        <%var contents = JSON.parse(contents).content%>
                        <% for(var i=0; i<contents.length; i++){ %>
                            <%var bg = JSON.stringify(contents[i].bg) %>
                            <li style="background:<%=JSON.parse(bg)%>;background-size:cover;width:320px;" class="swiper-slide">
                            <div style="position:relative;" class="li_div">
                            <%var css = JSON.stringify(contents[i].css)%>
                            <%var css = JSON.parse(css)%>
                                <% for(var j=0; j<css.length; j++){ %>
                                    <% var csscontent= JSON.stringify(css[j])%>
                                    <% var csscontent= JSON.parse(csscontent)%>
                                    <div class="page-con" style="top:<%=csscontent.top%>;left:<%=csscontent.left%>;width:<%=csscontent.width%>px;height:<%=csscontent.height%>px;position:absolute">
                                        <%var html = JSON.stringify(css[j].html)%>
                                        <%-JSON.parse(html)%>
                                    </div>
                                <% } %>
                                </div>
                                <section class="u-arrow-bottom">
                                    <!--<img src="/web/res/images/arrow.png">-->
                                </section>
                              </li>
                      <% } %>
                      <% } %>
                  </ul>
            </div>
        <script>
            var setting = <%-JSON.stringify(setting)%>;
            var result = <%-JSON.stringify(contents)%>;
            var version = '<%=result.STATIC_VERSION%>';

            require.config({
                baseUrl: '/web/res/js',
                urlArgs: "_=" + (version ? version : (new Date()).getTime())
            });
            require(['mobile/h5', 'mobile/idangerous.swiper.min'], function(previewInit) {
                $('#loading').remove();
                $('#Js-audio').show();
                //        $('#Js-container li:first').removeClass("f-hide");
                previewInit($('#Js-container li:first'), result, setting);
                $("#Js-container").show();
            });
            <%-(setting.jscode)%>
        </script>
    </body>
    <% } else{ %>活动不存在或已过期<% } %>
</html>
